package sample;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.reactive.server.WebTestClient;
import org.springframework.web.bind.annotation.RestController;

@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class HelloWebfluxApplicationTests {
    @Autowired
    WebTestClient rest;

    @Test
    public void basicWhenNoCredentialsThenUnauthorized(){
        this.rest
                .get()
                .uri("/")
                .exchange()
                .expectStatus().isUnauthorized();
    }



}
